package com.ghost.view.Email
{
	import com.ghost.manager.HDmedia_manager;
	import com.ghost.manager.Pop_win_manager;
	import com.ghost.manager.Tip_manager;
	import com.ghost.model.Configure_url;
	import com.ghost.model.Global_data;
	import com.ghost.view.pop.Pop_base;
	
	import flash.display.Sprite;
	import flash.utils.setTimeout;

	/**
	 * @author ghost
	 * 邮件系统
	 */
	public class Email_pop extends Pop_base
	{
		public function Email_pop()
		{
			var bb:Sprite = new Sprite();
			bb.graphics.beginFill(0xff6500);
			bb.graphics.drawRect(0,0,150,100);
			bb.graphics.endFill();
			this.addChild(bb);
			
			var ss:Sprite = new Sprite();
			ss.graphics.beginFill(0xffff00);
			ss.graphics.drawRect(0,0,100,20);
			ss.graphics.endFill();
			this.addChild(ss);
			
			var close:Sprite = new Sprite();
			close.graphics.beginFill(0xff0000);
			close.graphics.drawCircle(10,10,10);
			close.graphics.endFill();
			this.addChild(close);
			close.x = 130;
			HDmedia_manager.getInstance().play_m4a(Configure_url.sound_url+"bg1.m4a");
			Tip_manager.getInstance().add_tip(close,'close')
			this.type = 0;
			this.back_mc = ss;
			this.close_obj = close;
			this.name = "Email_pop";
			super();
			init();
		}
		/**
		 * 初始化
		 */		
		public function first_init():void
		{
			
		}
		override public function close_all():void
		{
			HDmedia_manager.getInstance().stop_m4a(Configure_url.sound_url+"bg1.m4a");
			Pop_win_manager.getInstance().Remove_pop_win(this);
			Global_data.show_game_des.show('邮件关闭了1！');
			Global_data.show_game_des.show('邮件关闭了2！');
			//移除其他事件
		}
	}
}